using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class InviteFriend : GeneratedMessageLite<InviteFriend, InviteFriend.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<InviteFriend, InviteFriend.Builder>
		{
			private bool resultIsReadOnly;
			private InviteFriend result;
			protected override InviteFriend.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override InviteFriend MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override InviteFriend DefaultInstanceForType
			{
				get
				{
					return InviteFriend.DefaultInstance;
				}
			}
			public uint Uin
			{
				get
				{
					return this.result.Uin;
				}
				set
				{
					this.SetUin(value);
				}
			}
			public SKBuiltinString_t NickName
			{
				get
				{
					return this.result.NickName;
				}
				set
				{
					this.SetNickName(value);
				}
			}
			public string Email
			{
				get
				{
					return this.result.Email;
				}
				set
				{
					this.SetEmail(value);
				}
			}
			public string Remark
			{
				get
				{
					return this.result.Remark;
				}
				set
				{
					this.SetRemark(value);
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public uint FriendType
			{
				get
				{
					return this.result.FriendType;
				}
				set
				{
					this.SetFriendType(value);
				}
			}
			public Builder()
			{
				this.result = InviteFriend.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(InviteFriend cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private InviteFriend PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					InviteFriend other = this.result;
					this.result = new InviteFriend();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override InviteFriend.Builder Clear()
			{
				this.result = InviteFriend.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override InviteFriend.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new InviteFriend.Builder(this.result);
				}
				return new InviteFriend.Builder().MergeFrom(this.result);
			}
			public override InviteFriend BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override InviteFriend.Builder MergeFrom(IMessageLite other)
			{
				if (other is InviteFriend)
				{
					return this.MergeFrom((InviteFriend)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override InviteFriend.Builder MergeFrom(InviteFriend other)
			{
				return this;
			}
			public override InviteFriend.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override InviteFriend.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(InviteFriend._inviteFriendFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = InviteFriend._inviteFriendFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasUin = input.ReadUInt32(ref this.result.uin_);
							continue;
						}
						if (num3 == 18u)
						{
							SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasNickName)
							{
								builder.MergeFrom(this.NickName);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.NickName = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 <= 34u)
						{
							if (num3 == 26u)
							{
								this.result.hasEmail = input.ReadString(ref this.result.email_);
								continue;
							}
							if (num3 == 34u)
							{
								this.result.hasRemark = input.ReadString(ref this.result.remark_);
								continue;
							}
						}
						else
						{
							if (num3 == 42u)
							{
								this.result.hasUserName = input.ReadString(ref this.result.userName_);
								continue;
							}
							if (num3 == 48u)
							{
								this.result.hasFriendType = input.ReadUInt32(ref this.result.friendType_);
								continue;
							}
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public InviteFriend.Builder SetUin(uint value)
			{
				this.PrepareBuilder();
				this.result.hasUin = true;
				this.result.uin_ = value;
				return this;
			}
			public InviteFriend.Builder ClearUin()
			{
				this.PrepareBuilder();
				this.result.hasUin = false;
				this.result.uin_ = 0u;
				return this;
			}
			public InviteFriend.Builder SetNickName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasNickName = true;
				this.result.nickName_ = value;
				return this;
			}
			public InviteFriend.Builder SetNickName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasNickName = true;
				this.result.nickName_ = builderForValue.Build();
				return this;
			}
			public InviteFriend.Builder MergeNickName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasNickName && this.result.nickName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.nickName_ = SKBuiltinString_t.CreateBuilder(this.result.nickName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.nickName_ = value;
				}
				this.result.hasNickName = true;
				return this;
			}
			public InviteFriend.Builder ClearNickName()
			{
				this.PrepareBuilder();
				this.result.hasNickName = false;
				this.result.nickName_ = null;
				return this;
			}
			public InviteFriend.Builder SetEmail(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasEmail = true;
				this.result.email_ = value;
				return this;
			}
			public InviteFriend.Builder ClearEmail()
			{
				this.PrepareBuilder();
				this.result.hasEmail = false;
				this.result.email_ = "";
				return this;
			}
			public InviteFriend.Builder SetRemark(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasRemark = true;
				this.result.remark_ = value;
				return this;
			}
			public InviteFriend.Builder ClearRemark()
			{
				this.PrepareBuilder();
				this.result.hasRemark = false;
				this.result.remark_ = "";
				return this;
			}
			public InviteFriend.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public InviteFriend.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public InviteFriend.Builder SetFriendType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasFriendType = true;
				this.result.friendType_ = value;
				return this;
			}
			public InviteFriend.Builder ClearFriendType()
			{
				this.PrepareBuilder();
				this.result.hasFriendType = false;
				this.result.friendType_ = 0u;
				return this;
			}
		}
		public const int UinFieldNumber = 1;
		public const int NickNameFieldNumber = 2;
		public const int EmailFieldNumber = 3;
		public const int RemarkFieldNumber = 4;
		public const int UserNameFieldNumber = 5;
		public const int FriendTypeFieldNumber = 6;
		private static readonly InviteFriend defaultInstance;
		private static readonly string[] _inviteFriendFieldNames;
		private static readonly uint[] _inviteFriendFieldTags;
		private bool hasUin;
		private uint uin_;
		private bool hasNickName;
		private SKBuiltinString_t nickName_;
		private bool hasEmail;
		private string email_ = "";
		private bool hasRemark;
		private string remark_ = "";
		private bool hasUserName;
		private string userName_ = "";
		private bool hasFriendType;
		private uint friendType_;
		private int memoizedSerializedSize = -1;
		public static InviteFriend DefaultInstance
		{
			get
			{
				return InviteFriend.defaultInstance;
			}
		}
		public override InviteFriend DefaultInstanceForType
		{
			get
			{
				return InviteFriend.DefaultInstance;
			}
		}
		protected override InviteFriend ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint Uin
		{
			get
			{
				return this.uin_;
			}
		}
		public SKBuiltinString_t NickName
		{
			get
			{
				return this.nickName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public string Email
		{
			get
			{
				return this.email_;
			}
		}
		public string Remark
		{
			get
			{
				return this.remark_;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public uint FriendType
		{
			get
			{
				return this.friendType_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasUin && this.hasNickName;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUin)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.Uin);
				}
				if (this.hasNickName)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.NickName);
				}
				if (this.hasEmail)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.Email);
				}
				if (this.hasRemark)
				{
					num += CodedOutputStream.ComputeStringSize(4, this.Remark);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(5, this.UserName);
				}
				if (this.hasFriendType)
				{
					num += CodedOutputStream.ComputeUInt32Size(6, this.FriendType);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private InviteFriend()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] inviteFriendFieldNames = InviteFriend._inviteFriendFieldNames;
			if (this.hasUin)
			{
				output.WriteUInt32(1, inviteFriendFieldNames[4], this.Uin);
			}
			if (this.hasNickName)
			{
				output.WriteMessage(2, inviteFriendFieldNames[2], this.NickName);
			}
			if (this.hasEmail)
			{
				output.WriteString(3, inviteFriendFieldNames[0], this.Email);
			}
			if (this.hasRemark)
			{
				output.WriteString(4, inviteFriendFieldNames[3], this.Remark);
			}
			if (this.hasUserName)
			{
				output.WriteString(5, inviteFriendFieldNames[5], this.UserName);
			}
			if (this.hasFriendType)
			{
				output.WriteUInt32(6, inviteFriendFieldNames[1], this.FriendType);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUin)
			{
				num ^= this.uin_.GetHashCode();
			}
			if (this.hasNickName)
			{
				num ^= this.nickName_.GetHashCode();
			}
			if (this.hasEmail)
			{
				num ^= this.email_.GetHashCode();
			}
			if (this.hasRemark)
			{
				num ^= this.remark_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasFriendType)
			{
				num ^= this.friendType_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			InviteFriend inviteFriend = value as InviteFriend;
			return inviteFriend != null && (this.hasUin == inviteFriend.hasUin && (!this.hasUin || this.uin_.Equals(inviteFriend.uin_))) && (this.hasNickName == inviteFriend.hasNickName && (!this.hasNickName || this.nickName_.Equals(inviteFriend.nickName_))) && (this.hasEmail == inviteFriend.hasEmail && (!this.hasEmail || this.email_.Equals(inviteFriend.email_))) && (this.hasRemark == inviteFriend.hasRemark && (!this.hasRemark || this.remark_.Equals(inviteFriend.remark_))) && (this.hasUserName == inviteFriend.hasUserName && (!this.hasUserName || this.userName_.Equals(inviteFriend.userName_))) && (this.hasFriendType == inviteFriend.hasFriendType && (!this.hasFriendType || this.friendType_.Equals(inviteFriend.friendType_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<InviteFriend, InviteFriend.Builder>.PrintField("Uin", this.hasUin, this.uin_, writer);
			GeneratedMessageLite<InviteFriend, InviteFriend.Builder>.PrintField("NickName", this.hasNickName, this.nickName_, writer);
			GeneratedMessageLite<InviteFriend, InviteFriend.Builder>.PrintField("Email", this.hasEmail, this.email_, writer);
			GeneratedMessageLite<InviteFriend, InviteFriend.Builder>.PrintField("Remark", this.hasRemark, this.remark_, writer);
			GeneratedMessageLite<InviteFriend, InviteFriend.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<InviteFriend, InviteFriend.Builder>.PrintField("FriendType", this.hasFriendType, this.friendType_, writer);
		}
		public static InviteFriend ParseFrom(byte[] data)
		{
			return InviteFriend.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private InviteFriend MakeReadOnly()
		{
			return this;
		}
		public static InviteFriend.Builder CreateBuilder()
		{
			return new InviteFriend.Builder();
		}
		public override InviteFriend.Builder ToBuilder()
		{
			return InviteFriend.CreateBuilder(this);
		}
		public override InviteFriend.Builder CreateBuilderForType()
		{
			return new InviteFriend.Builder();
		}
		public static InviteFriend.Builder CreateBuilder(InviteFriend prototype)
		{
			return new InviteFriend.Builder(prototype);
		}
		static InviteFriend()
		{
			InviteFriend.defaultInstance = new InviteFriend().MakeReadOnly();
			InviteFriend._inviteFriendFieldNames = new string[]
			{
				"Email",
				"FriendType",
				"NickName",
				"Remark",
				"Uin",
				"UserName"
			};
			InviteFriend._inviteFriendFieldTags = new uint[]
			{
				26u,
				48u,
				18u,
				34u,
				8u,
				42u
			};
			object.ReferenceEquals(micromsg.Proto.InviteFriend.Descriptor, null);
		}
	}
}
